<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>09_Promise-Promise的finally的回调</title>
</head>
<body>

  <script>
    const p = new Promise((resolve, reject) => {
      // pending

      // fulfilled
      resolve("fulfilled")

      // rejected
      // reject("rejected")
    })

    p.then(res => {
      console.log("then", res)
    }).catch(err => {
      console.log("catch", err)
    }).finally(() => {
      console.log("finally")
    })

  </script>
  
</body>
</html>